Skip to content

feat(web,mobile,server): mention the machine your thread runs on - #31967

Open
DominikScholz wants to merge 1 commit into
pingdotgg:mainfrom
DominikScholz:feat/composer-own-machine-mention
Open

DominikScholz wants to merge 1 commit into
pingdotgg:mainfrom
DominikScholz:feat/composer-own-machine-mention

Conversation

@DominikScholz

@DominikScholz DominikScholz commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The @ menu never offered the machine the thread runs on, so typing its name found nothing, even though I sometimes still want to name it.

Change

It's now listed and labelled "This thread's machine", on web, desktop and mobile.

Naming your own machine would have sent the agent to t3_environment_link, showing a card asking to link the machine to itself. That tool now refuses the agent's own environment and tells it to work here, and the mention's guidance says to expect that.

Before After
before after

Scope and approval

The menu left this machine out on purpose, so this is a behavior change. I made this PR because of this discussion on X, where ScriptedAlchemy replied to my list of these problems with "Send PRs, t3 is very good at working on t3". There is no Ideas discussion or maintainer sign-off beyond that, so please close it or redirect it if you'd rather handle it another way.

Related:

Verification

  • Failing tests first in composerThreadItems.test.ts and PeerLinkRequests.test.ts.
  • Before and after recorded in the running web app, captured at 1/3 speed and sped back up. The recordings predate a clean rebase, so I re-checked the current head in the app: @luc lists the machine as "This thread's machine".
  • vp run check:changed passes on this head.
  • Not checked: the mention's text is model-facing and the paid evals were not run, since no API keys were available. Mobile uses the same helper but was not run on a device.

Reviewed with sol-loop: 1 round with gpt-6.1-sol, before the rebase. Sol verdict: approved

Created with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 6, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 89e9ced

Macroscope's review found this PR approvable — Users can explicitly mention their thread’s own machine, with a distinct label and guidance that no self-link is needed. Default execution targets and bare-@ behavior remain unchanged.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The composer now includes the thread’s current machine among matching environments and labels it “This thread's machine.” The server rejects link requests for the caller’s own environment ID. The environment context describes information reported by t3_environment_link.

Changes: Environment linking

Layer / File(s) Summary
Current machine matching
packages/client-runtime/src/composerThreadItems.ts, packages/client-runtime/src/composerThreadItems.test.ts, packages/shared/src/composerContextReferences.ts, apps/mobile/src/i18n/translations/*.json, apps/web/src/i18n/translations/*.json
Matching results include the thread’s current machine and label it “This thread's machine.” The environment context states that t3_environment_link reports whether the specified environment is the machine the user means. Mobile and web translations add the corresponding label.
Self-link request rejection
apps/server/src/peer/PeerLinkRequests.ts, apps/server/src/peer/PeerLinkRequests.test.ts
Requests for the caller’s own environment ID return invalid_request. The test checks that no link-request card is created.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Possibly related issues

  • pingdotgg/t3code#38632 — This change adds self-link rejection in the same request path, but does not change requestedAccess comparison or address the reported access-upgrade failure.

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · up to 72b03

The @ menu now offers the thread's own machine, and the server rejects attempts to link an environment to itself. No concrete merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "feat(web,mobile,server): mention the machine your thread runs on" matches the main change: the @ menu now lists the thread's own machine on web, desktop, and mobile, and the server refuses …
Description check Passed The description follows the template sections (Problem, Change, Scope, Verification) and gives substantive content. Problem: the @ menu never offered the thread's machine. Change: the machine is liste…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "feat(web,mobile,server): mention the machine your thread runs on" matches the main change: the @ menu now lists the thread's own machine on web, desktop, and mobile, and the server refuses self-links. It is a conventional-commit title in plain language and is specific enough for a teammate scanning history. It does not mention the server-side refusal of self-linking, but it does not need to cover every detail.

Full details: Description check

Explanation

The description follows the template sections (Problem, Change, Scope, Verification) and gives substantive content. Problem: the @ menu never offered the thread's machine. Change: the machine is listed as "This thread's machine" and the link tool refuses self-links. Scope: it acknowledges this is a feature-like behavior change and links a discussion instead of an accepted issue, which conflicts with the template's rule that only bug fixes are accepted. Verification lists focused tests, recorded before/after checks, and what was not checked. Some items are weak: the Scope section does not link an issue showing a bug, and it relies on an X post as approval. The template's 'Change' guidance to split independent fixes is only partly met, since the PR notes three related PRs. Overall the description is mostly complete, so it passes, but the Scope gap should be raised.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0f671db and 72b0371.

Files selected for processing: 22

  • apps/mobile/src/i18n/translations/de.json
  • apps/mobile/src/i18n/translations/en.json
  • apps/mobile/src/i18n/translations/es.json
  • apps/mobile/src/i18n/translations/fr.json
  • apps/mobile/src/i18n/translations/ja.json
  • apps/mobile/src/i18n/translations/ko.json
  • apps/mobile/src/i18n/translations/pt-BR.json
  • apps/mobile/src/i18n/translations/ru.json
  • apps/mobile/src/i18n/translations/sv.json
  • apps/mobile/src/i18n/translations/zh.json
  • apps/web/src/i18n/translations/de.json
  • apps/web/src/i18n/translations/en.json
  • apps/web/src/i18n/translations/es.json
  • apps/web/src/i18n/translations/fr.json
  • apps/web/src/i18n/translations/ja.json
  • apps/web/src/i18n/translations/ko.json
  • apps/web/src/i18n/translations/pt-BR.json
  • apps/web/src/i18n/translations/ru.json
  • apps/web/src/i18n/translations/sv.json
  • apps/web/src/i18n/translations/zh.json
  • packages/client-runtime/src/composerThreadItems.test.ts
  • packages/client-runtime/src/composerThreadItems.ts
Files skipped from review as they are similar to previous changes: 20

  • apps/mobile/src/i18n/translations/de.json
  • apps/mobile/src/i18n/translations/en.json
  • apps/mobile/src/i18n/translations/es.json
  • apps/mobile/src/i18n/translations/fr.json
  • apps/mobile/src/i18n/translations/ja.json
  • apps/mobile/src/i18n/translations/ko.json
  • apps/mobile/src/i18n/translations/pt-BR.json
  • apps/mobile/src/i18n/translations/ru.json
  • apps/mobile/src/i18n/translations/sv.json
  • apps/mobile/src/i18n/translations/zh.json
  • apps/web/src/i18n/translations/de.json
  • apps/web/src/i18n/translations/en.json
  • apps/web/src/i18n/translations/es.json
  • apps/web/src/i18n/translations/fr.json
  • apps/web/src/i18n/translations/ja.json
  • apps/web/src/i18n/translations/ko.json
  • apps/web/src/i18n/translations/pt-BR.json
  • apps/web/src/i18n/translations/ru.json
  • apps/web/src/i18n/translations/sv.json
  • apps/web/src/i18n/translations/zh.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@maria-rcks

maria-rcks commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Note

Written by gpt-6.1-sol on behalf of Maria

Verified in a real dev environment

Verified unchanged head 89e9ced0277911ce77d28d1b2abdd55a641a1cd2 on this Linux VM using the real dev web app, Playwright from the repository dependencies, Google Chrome, and real Codex gpt-6.1-sol turns. Created a real git repository, added its project through the app, and enabled linked environments in Settings. No mocks, fixtures, or demo data.

  • On github/main (4a3be943c9), searching the current machine's name found no result. A real provider self-link call returned pending and created a link-request card.
  • On this head, the same machine search offers "This thread's machine". Keyboard selection inserts its chip; Backspace removes it.
  • Sent the selected machine mention to Codex. Its real MCP call rejected self-linking without creating a card, then the agent ran pwd and cat README.md locally and returned the correct contents.
  • Nearby behavior: the bare mention trigger offers no machine, file-name search still inserts the README chip, and sending that file mention through Codex reads the correct file.
  • Blacksmith: the two focused files passed (22 tests). vp run check:changed 6577c6b6185167c0e502fa01f9e8e8f2dee6ff25 passed format, lint, knip, GraphQL, affected typechecks, and 61 tests after fetching the parent ancestry into the shallow runner snapshot. GitHub checks are green. No source changes were needed.

Actual provider/tool transcript:

main: t3_environment_link(environmentId=<current environment>)
=> {"status":"pending","turnItemId":"turn-item:link-request:..."}
=> visible "Link a machine to this environment" card

PR: t3_environment_link(environmentId="4e90b0ac-32cc-4aaf-91b7-67933e1f408b")
=> {"_tag":"OrchestratorMcpFailure","code":"invalid_request",
    "message":"That is the machine you run on. Work here: it needs no link."}
(no link-request card)

pwd; cat README.md
=> /home/user/mention-verification
=> machine-mention-verification

Before, main:

main machine-name search has no result

After, PR:

PR offers the current machine with its own-machine label

keyboard selection and removal followed by file mention selection

main self-link call creates an unnecessary link-request card

PR rejects self-linking and the real provider reads the local repository

Not verified

Native iOS/Android and Electron shells were not exercised on this Linux web run. Cross-machine, relay, and tunnel linking were not exercised because this task has one environment. Other providers and statistical prompt evals were not run; the changed guidance was exercised with real Codex turns instead.

@DominikScholz
DominikScholz force-pushed the feat/composer-own-machine-mention branch from 89e9ced to 0f671db Compare November 19, 2026 11:17
@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). and removed size:S 10-29 changed lines (additions + deletions). labels Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR conflicts with main. Rebase it or merge main into it. If it still conflicts after 7 days with no activity, it will be closed automatically.

See the conflict window.

@github-actions github-actions Bot added the needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. label Nov 22, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DominikScholz
DominikScholz force-pushed the feat/composer-own-machine-mention branch from 0f671db to 72b0371 Compare November 22, 2026 19:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Conflicts with its base branch. Closes after 7 days with no activity. size:M 30-99 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants